<%@ Page Language="C#" AutoEventWireup="true" CodeFile="viewHistory.aspx.cs" Inherits="Private_CMS_main_actions_history_viewHistory" %>
<%@ Register TagPrefix="flux" Namespace="Deepcode.Flux.Core.UI.Controls" Assembly="Deepcode.Flux.Core" %>
<html>
<head runat="server">
	<link href="../../../../../Asset/Style/GeneralStyle.css" rel="stylesheet" type="text/css" />
	<link href="../../localstyle.css" rel="stylesheet" type="text/css" />
	<script language="javascript">
	function confirmRollback()
	{
		return confirm("Are you sure you want to roll back to this version ?");
	}
	function doPreview( vv )
	{
		var url = "<%=GetTypeHistoryForm()%>" + vv;
		var w = window.open( url, "versionView", "width=400, height=400, resizable=yes, scrollbars=yes", true );
		if( w.focus != null ) w.focus();
		return false;
	}
	</script>
</head>
<body class="nopadshaded">

<form id="form1" runat="server">
<flux:HostTable runat="server">

<%-- Form area --%>
<flux:Section runat="server" WithFooter="true" Title="Version History">
<flux:StandardDataGrid runat="server" CellPadding="4" ID="_data" ClickRowSelect="false" AllowPaging="false" DataKeyField="VersionNumber">
	<Columns>

		<asp:BoundColumn
			ItemStyle-Width="50" ReadOnly="true" ItemStyle-VerticalAlign="Top"
			DataField="VersionNumber" HeaderText="Version"></asp:BoundColumn>
		
		<asp:BoundColumn
			ItemStyle-Width="100" ReadOnly="true" ItemStyle-VerticalAlign="Top"
			DataField="CheckedInDT" HeaderText="Date/Time" DataFormatString="{0:dd/mm/yyyy hh:MM}"></asp:BoundColumn>
		
		<asp:BoundColumn
			ItemStyle-Width="100" ReadOnly="true" ItemStyle-VerticalAlign="Top"
			DataField="CheckedInUsername" HeaderText="User"></asp:BoundColumn>
		
		<asp:BoundColumn
			ReadOnly="true" ItemStyle-VerticalAlign="Top"
			DataField="VersionNotesHTML" HeaderText="Notes"></asp:BoundColumn>
			
		<asp:TemplateColumn HeaderText="">
			<ItemTemplate>
			<asp:LinkButton runat="server" id="btnPreview" CommandName="Preview" CssClass="SafeLink">Preview</asp:LinkButton>
			<asp:LinkButton runat="server" id="btnRollback" CommandName="Rollback" CssClass="DangerLink">Rollback</asp:LinkButton>
			</ItemTemplate>
		</asp:TemplateColumn>

	</Columns>
</flux:StandardDataGrid>
</flux:Section>

<%-- Buttons --%>
<flux:Section runat="server">
<flux:PadBox CssClass="Pad5Button" runat="server">
	<asp:Button runat="server" ID="btnCancel" Text="Back" OnClick="btnCancel_Click" CausesValidation="False"/>
</flux:PadBox>
</flux:Section>

</flux:HostTable>

</form>
</body>
</html>
